writing functions with parameters